home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.xml;
-
- import com.extensibility.util.StringUtilities;
- import java.util.Vector;
-
- public class ExternalGEDeclaration extends GeneralEntityDeclaration {
- String notation;
-
- public ExternalGEDeclaration(String var1, String var2, URI var3) {
- super(var1, var2, var3);
- }
-
- public ExternalGEDeclaration(String var1, String var2, URI var3, String var4) {
- this(var1, var2, var3);
- this.notation = var4;
- }
-
- public String getClassName() {
- return "com.extensibility.xml.ExternalGEDeclaration";
- }
-
- public boolean isPE() {
- return false;
- }
-
- public boolean isUnparsed() {
- return this.notation != null;
- }
-
- public String getNotation() {
- return this.notation;
- }
-
- public void setNotation(String var1) {
- String var2 = this.notation;
- this.notation = var1;
- ((BaseDeclaration)this).fireChangeEvent(54, var2);
- }
-
- public String getSource() {
- StringBuffer var1 = new StringBuffer(String.valueOf(String.valueOf("<!ENTITY ").concat(String.valueOf(super.name))).concat(String.valueOf(" ")));
- if (super.publicID != null) {
- var1.append(String.valueOf(String.valueOf(String.valueOf("PUBLIC ").concat(String.valueOf(DTDUtilities.convertPEReferences(StringUtilities.doubleQuoted(super.publicID), true)))).concat(String.valueOf(" "))).concat(String.valueOf(DTDUtilities.convertPEReferences(StringUtilities.doubleQuoted(super.systemID == null ? null : super.systemID.toSource()), true))));
- } else {
- var1.append(String.valueOf("SYSTEM ").concat(String.valueOf(DTDUtilities.convertPEReferences(StringUtilities.doubleQuoted(super.systemID == null ? null : super.systemID.toSource()), true))));
- }
-
- if (this.isUnparsed()) {
- var1.append(String.valueOf("NDATA ").concat(String.valueOf(this.notation)));
- }
-
- var1.append(String.valueOf(">").concat(String.valueOf(BaseDeclaration.LINE_SEPARATOR)));
- return var1.toString();
- }
-
- public Vector getPrerequisites(SchemaIntf var1) {
- Vector var2 = super.getPrerequisites(var1);
- if (this.isUnparsed()) {
- NotationDeclaration var3 = (NotationDeclaration)var1.getNamedDeclaration(this.getNotation(), Class.forName("com.extensibility.xml.NotationDeclaration"));
- if (var3 != null) {
- var2.addElement(var3);
- }
- }
-
- return var2;
- }
-
- public void checkForErrors(SchemaIntf var1) {
- super.checkForErrors(var1);
- if (this.notation != null && var1.getNamedDeclaration(this.notation, Class.forName("com.extensibility.xml.NotationDeclaration")) == null) {
- super.errors.addElement(new ParserException(223, this.notation));
- }
-
- }
- }
-